-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce partitioner interface #592
Conversation
Introduce partitioner interface
Thanks for contributing. I've reviewed this and I personally think it would be better to use an associated type instead of generic type for the I've spent some time and created this patch so you can observe the difference. By doing that we avoid introducing the Partitioner trait pretty much everywhere. The patch might require further testing. It was mostly to illustrate the idea. Ideally we also want a separate I'm going on vacation next week and I'll let you sync with @duarten and @davidblewett on what you all think is better for this. |
Yeah, so using associated type was my first approach (I've working version somewhere). Later on decided to use generic type because of few reasons:
For sure using generic types requires more changes in the code base + signatures are becoming more complex. I'll start a thread on Slack to discuss on the direction here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Add interface to specify custom partitioners by extending
ProducerContext
trait with capability to return optional custom partitioner.